package com.cloudjan.demo.controller;

import com.cloudjan.demo.service.DemoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class ConsumerApp {
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext ioc = new ClassPathXmlApplicationContext("consumer.xml");
        ioc.start();
        DemoService demoService = (DemoService) ioc.getBean("demoService");
        String hello = demoService.sayHello("dubbo");
        System.out.println(hello);
        System.in.read();
    }
}
